According to a conventional image coding method represented by ITU-T standards referred to as H.26x or ISO/IEC standards referred to as MPEG-x, a picture is partitioned into predetermined units, and coding is performed on a per-unit basis. For example, according to H.264/MPEG-4 AVC scheme (see Non Patent Literature (NPL) 1), a picture is processed in a unit referred to as a macroblock including horizontal 16 pixels and vertical 16 pixels.
For motion compensation, a macroblock is divided into blocks (the minimum block size is horizontal 4 pixels×vertical 4 pixels). Subsequently, motion compensation is performed using different motion vectors for respective blocks, and frequency transform is performed on a differential signal between a signal resulting from the motion compensation and an original signal to concentrate the differential signal to the low frequency region. Then, information can be compressed by quantizing a resulting signal. According to a method of coding a picture on a per-block basis using orthogonal transform, such as discrete cosine transform (DCT), in which differential signals are concentrated to the low frequency region, it is known that grid pattern distortion referred to as blocking artifacts occur at block boundaries. Such blocking artifacts can be decreased by applying deblocking filter.